
(function( window, undefined ) {
  window.fwCrypt = {};
  var fwCrypt = {
		path : '' 
  };
  /*是否开启调试模式*/
  fwCrypt.debug = true; 
  window.fwCrypt = fwCrypt;
}) (window);

var canCrypt = 
$script.path('../static/fw/plugin/')
// load jquery and plugin at the same time. name it 'bundle'
$script(['crypt/cryptoJS/components/core.js'
         , 'crypt/cryptoJS/rollups/tripledes.js'
         , 'crypt/cryptoJS/components/mode-ecb.js'], 'bundle')

// load your usage
//$script('my-app-that-uses-plugin.js')

/*--- in my-jquery-plugin.js ---*/
$script.ready('bundle', function() {
  // jquery & plugin (this file) are both ready
  // plugin code...

	  var message = '20';
	  var key = '12345678';
	   
	  var ciphertext = encryptByDES(message, key);
	  // ciphertext: 8dKft9vkZ4I=
	  $("#console").append(',ciphertext:'+ciphertext);
	  var plaintext = decryptByDES(ciphertext, key);
	  // plaintext : Message
	  $("#console").append(',plaintext :'+plaintext);
})
